<?php
/**
 * Created by PhpStorm.
 * User: zhao
 * Date: 2018/5/21
 * Time: 16:47
 */

namespace App\Obersvers;


use App\Models\CreditsRecod;
use Illuminate\Support\Facades\DB;

class CreditsRecordObersver
{
    public function created(CreditsRecod $creditsRecod)
    {
        $res = DB::table('wxuser_mcard')->where('id_wxuser_mcard',$creditsRecod->id_wxuser_mcard)
            ->increment('remain_credits',$creditsRecod->value);
    }
}